curl --request POST \
--url https://api.example.com/api/categorias \
--header 'Content-Type: application/json' \
--data '
{
"nombre": "<string>",
"slug": "<string>"
}
'{
"201": {},
"400": {},
"401": {},
"403": {},
"categoria_id": 123,
"nombre": "<string>",
"slug": "<string>",
"productos": [
{}
]
}Create a new product category
curl --request POST \
--url https://api.example.com/api/categorias \
--header 'Content-Type: application/json' \
--data '
{
"nombre": "<string>",
"slug": "<string>"
}
'{
"201": {},
"400": {},
"401": {},
"403": {},
"categoria_id": 123,
"nombre": "<string>",
"slug": "<string>",
"productos": [
{}
]
}Authorization: Bearer YOUR_ADMIN_TOKEN
{
"nombre": "Electronics",
"slug": "electronics"
}
{
"categoria_id": 1,
"nombre": "Electronics",
"slug": "electronics",
"productos": []
}
curl -X POST https://api.iquea.com/api/categorias \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
-d '{
"nombre": "Electronics",
"slug": "electronics"
}'